package enums

type MsgType int

const (
	SensorMsg MsgType = iota + 1
	SystemMsg
	LoginMsg
	LogoutMsg
)

type MsgTypeName struct {
	Name string
}

func (it MsgType) Get() MsgTypeName {
	switch it {
	case SensorMsg:
		return MsgTypeName{Name: "sensor"}
	case SystemMsg:
		return MsgTypeName{Name: "system"}
	case LoginMsg:
		return MsgTypeName{Name: "login"}
	case LogoutMsg:
		return MsgTypeName{Name: "logout"}
	default:
		return MsgTypeName{}
	}
}
